<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <title>修改消息基础</title>
  <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/static/include/css/style.css">
  <link href="/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/static/css/summernote.css"/>
  <style>
    #receive-table tr {
      height: 35px;
    }

    #receive-table tr .receive-label {
      width: 15%;
      text-align: center;
    }

    #receive-table tr .receive-value {
      width: 85%;
    }

    .panel {
      margin-bottom: 0;
    }

    label.error {
      position: relative;
      color: #ef392b;
      left: 0;
      top: 0;
      font-size: 12px;
      z-index: 99;
    }

    #validate-result {
      color: #ef392b;
    }
  </style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="editForm" action="/msg/messages">
    <input name="msgId" id="msgId" field="msgId" type="hidden">
    <input type="hidden" name="oper" id="oper" field="oper"/>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">消息类型：</label>
      <div class="col-sm-8">
        <select name="msgType" id="type" class="form-control">

        </select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">消息标题：</label>
      <div class="col-sm-8">
        <input name="msgTitle" id="msgTitle" field="msgTitle" class="form-control" type="text" maxlength="40" required>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">消息内容：</label>
      <div class="col-sm-8">
        <textarea id="msgContent" name="msgContent" field="msgContent"></textarea>
        <div id="validate-result"></div>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">发送方式：</label>
      <div class="col-sm-8">
        <div id="msgChannel">
<!--          <label th:each="dict : ${type}" class="check-box">-->
<!--            <input name="msgChannels" type="checkbox" th:value="${dict.value}" th:text="${dict.label}">-->
<!--          </label>-->
        </div>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">接收范围：</label>
      <div class="col-sm-8">
        <div>
          <label class="radio-box">
            <input type="radio" name="receiveRange" value="1" required/>部分
          </label>
          <label class="radio-box">
            <input type="radio" name="receiveRange" value="2" required/>全部
          </label>
        </div>
      </div>
    </div>
    <div class="form-group" style="display: none">
      <div id="receive-object">
        <label class="col-sm-3 control-label">接收对象：</label>
        <div class="col-sm-8">
          <input name="receiverObject" hidden="true"/>
          <table border="1" cellspacing="0" cellpadding="0" style="width: 100%" id="receive-table">
            <tr>
              <td class="receive-label">部门&nbsp;<a href="javascript:void(0);" onclick="selectDept()">选择</a></td>
              <td class="receive-value" id="current-dept">未选择</td>
              <td class="hidden" style="display: none" id="current-dept-rows"></td>
            </tr>
            <tr>
              <td class="receive-label">角色&nbsp;<a href="javascript:void(0)" onclick="selectRole()">选择</a></td>
              <td class="receive-value" id="current-role">未选择</td>
              <td class="hidden" style="display: none" id="current-role-rows"></td>
            </tr>
            <tr>
              <td class="receive-label">用户&nbsp;<a href="javascript:void(0)" onclick="selectUser()">选择</a></td>
              <td class="receive-value" id="current-user">未选择</td>
              <td class="hidden" style="display: none" id="current-user-rows"></td>
            </tr>
          </table>
          <div id="validate-result-object"></div>
        </div>
      </div>
    </div>
  </form>
  <div class="row" id="submit-area">
    <div class="col-sm-offset-5 col-sm-10">
      <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
      </button>&nbsp;
      <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
      </button>
    </div>
  </div>
</div>
<script src="/static/include/js/footer.js"></script>
<script src="/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js"></script>
<script src="/static/js/summernote.js"></script>
<script src="/static/js/summernote-zh-CN.js"></script>
<script src="/static/pages/msg/messages/messagesEdit.js"></script>
<script>
  $(function () {
    //$.common.initFormInfo();
    $('#msgContent').summernote({
      lang: 'zh-CN',
      height: '300px'
    });
  });
</script>
</body>
</html>